.class public Lcom/baidu/mobads/rewardvideo/RewardVideoAd;
.super Ljava/lang/Object;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/baidu/mobads/rewardvideo/RewardVideoAd$CustomIOAdEventListener;,
        Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;
    }
.end annotation


# instance fields
.field private a:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

.field private final b:Landroid/content/Context;

.field private c:Lcom/baidu/mobads/production/rewardvideo/a;

.field private d:Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;


# direct methods
.method public constructor <init>(Landroid/app/Activity;Ljava/lang/String;Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, p2, p3, v0}, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;-><init>(Landroid/app/Activity;Ljava/lang/String;Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;Z)V

    return-void
.end method

.method public constructor <init>(Landroid/app/Activity;Ljava/lang/String;Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;Z)V
    .locals 1

    .line 2
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 3
    sget-object v0, Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;->CREATE:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

    iput-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->a:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

    .line 4
    iput-object p1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->b:Landroid/content/Context;

    .line 5
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object p1

    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->b:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->initializeApplicationContext(Landroid/content/Context;)V

    .line 6
    iget-object p1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->b:Landroid/content/Context;

    invoke-static {p1}, Lcom/baidu/mobads/f/q;->a(Landroid/content/Context;)Lcom/baidu/mobads/f/q;

    move-result-object p1

    invoke-virtual {p1}, Lcom/baidu/mobads/f/q;->a()V

    .line 7
    iput-object p3, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->d:Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;

    .line 8
    new-instance p1, Lcom/baidu/mobads/production/rewardvideo/a;

    iget-object p3, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->b:Landroid/content/Context;

    invoke-direct {p1, p3, p2, p4}, Lcom/baidu/mobads/production/rewardvideo/a;-><init>(Landroid/content/Context;Ljava/lang/String;Z)V

    iput-object p1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;)V
    .locals 1

    const/4 v0, 0x0

    .line 9
    invoke-direct {p0, p1, p2, p3, v0}, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;-><init>(Landroid/content/Context;Ljava/lang/String;Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;Z)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;Z)V
    .locals 1

    .line 10
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 11
    sget-object v0, Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;->CREATE:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

    iput-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->a:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

    .line 12
    iput-object p1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->b:Landroid/content/Context;

    .line 13
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object p1

    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->b:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->initializeApplicationContext(Landroid/content/Context;)V

    .line 14
    iget-object p1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->b:Landroid/content/Context;

    invoke-static {p1}, Lcom/baidu/mobads/f/q;->a(Landroid/content/Context;)Lcom/baidu/mobads/f/q;

    move-result-object p1

    invoke-virtual {p1}, Lcom/baidu/mobads/f/q;->a()V

    .line 15
    iput-object p3, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->d:Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;

    .line 16
    new-instance p1, Lcom/baidu/mobads/production/rewardvideo/a;

    iget-object p3, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->b:Landroid/content/Context;

    invoke-direct {p1, p3, p2, p4}, Lcom/baidu/mobads/production/rewardvideo/a;-><init>(Landroid/content/Context;Ljava/lang/String;Z)V

    iput-object p1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    return-void
.end method

.method static synthetic a(Lcom/baidu/mobads/rewardvideo/RewardVideoAd;)Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->d:Lcom/baidu/mobads/rewardvideo/RewardVideoAd$RewardVideoAdListener;

    return-object p0
.end method

.method private a()V
    .locals 3

    .line 2
    new-instance v0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd$CustomIOAdEventListener;

    invoke-direct {v0, p0}, Lcom/baidu/mobads/rewardvideo/RewardVideoAd$CustomIOAdEventListener;-><init>(Lcom/baidu/mobads/rewardvideo/RewardVideoAd;)V

    .line 3
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    invoke-virtual {v1}, Lcom/baidu/mobads/openad/c/c;->removeAllListeners()V

    .line 4
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const-string v2, "AdUserClick"

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/openad/c/c;->addEventListener(Ljava/lang/String;Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;)V

    .line 5
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const-string v2, "AdLoaded"

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/openad/c/c;->addEventListener(Ljava/lang/String;Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;)V

    .line 6
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const-string v2, "AdStarted"

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/openad/c/c;->addEventListener(Ljava/lang/String;Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;)V

    .line 7
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const-string v2, "AdStopped"

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/openad/c/c;->addEventListener(Ljava/lang/String;Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;)V

    .line 8
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const-string v2, "AdError"

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/openad/c/c;->addEventListener(Ljava/lang/String;Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;)V

    .line 9
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const-string v2, "AdRvdieoCacheSucc"

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/openad/c/c;->addEventListener(Ljava/lang/String;Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;)V

    .line 10
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const-string v2, "AdRvdieoCacheFailed"

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/openad/c/c;->addEventListener(Ljava/lang/String;Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;)V

    .line 11
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const-string v2, "PlayCompletion"

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/openad/c/c;->addEventListener(Ljava/lang/String;Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;)V

    .line 12
    iget-object v1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const-string v2, "AdRvdieoPlayError"

    invoke-virtual {v1, v2, v0}, Lcom/baidu/mobads/openad/c/c;->addEventListener(Ljava/lang/String;Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;)V

    .line 13
    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    invoke-virtual {v0}, Lcom/baidu/mobads/production/rewardvideo/a;->request()V

    return-void
.end method

.method private a(Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;)V
    .locals 2

    .line 14
    iput-object p1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->a:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

    .line 15
    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    if-eqz v0, :cond_1

    .line 16
    sget-object v1, Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;->PAUSE:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

    if-ne p1, v1, :cond_0

    .line 17
    invoke-virtual {v0}, Lcom/baidu/mobads/production/b;->pause()V

    .line 18
    :cond_0
    sget-object v0, Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;->RESUME:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

    if-ne p1, v0, :cond_1

    .line 19
    iget-object p1, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    invoke-virtual {p1}, Lcom/baidu/mobads/production/b;->resume()V

    :cond_1
    return-void
.end method

.method public static setAppSid(Ljava/lang/String;)V
    .locals 1

    .line 1
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getCommonUtils()Lcom/baidu/mobads/utils/h;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/baidu/mobads/utils/h;->setAppId(Ljava/lang/String;)V

    return-void
.end method


# virtual methods
.method public isReady()Z
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/baidu/mobads/production/rewardvideo/a;->t()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    .line 2
    invoke-virtual {v0}, Lcom/baidu/mobads/production/rewardvideo/a;->a()Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    invoke-virtual {v0}, Lcom/baidu/mobads/production/rewardvideo/a;->b()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    return v0

    :cond_0
    const/4 v0, 0x0

    return v0
.end method

.method public declared-synchronized load()V
    .locals 2

    monitor-enter p0

    .line 1
    :try_start_0
    sget-boolean v0, Lcom/baidu/mobads/MobRewardVideoImpl;->mVideoPlaying:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v0, :cond_0

    .line 2
    monitor-exit p0

    return-void

    .line 3
    :cond_0
    :try_start_1
    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    if-eqz v0, :cond_1

    .line 4
    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/baidu/mobads/production/rewardvideo/a;->c(Z)V

    .line 5
    :cond_1
    invoke-direct {p0}, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->a()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 6
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public pause()V
    .locals 1

    .line 1
    sget-object v0, Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;->PAUSE:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

    invoke-direct {p0, v0}, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->a(Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;)V

    return-void
.end method

.method public resume()V
    .locals 1

    .line 1
    sget-object v0, Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;->RESUME:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;

    invoke-direct {p0, v0}, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->a(Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$ActivityState;)V

    return-void
.end method

.method public declared-synchronized show()V
    .locals 2

    monitor-enter p0

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    if-eqz v0, :cond_2

    .line 2
    sget-boolean v0, Lcom/baidu/mobads/MobRewardVideoImpl;->mVideoPlaying:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v0, :cond_0

    .line 3
    monitor-exit p0

    return-void

    .line 4
    :cond_0
    :try_start_1
    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    invoke-virtual {v0}, Lcom/baidu/mobads/production/b;->getCurrentXAdContainer()Lcom/baidu/mobads/interfaces/IXAdContainer;

    move-result-object v0

    const/4 v1, 0x1

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    .line 5
    invoke-virtual {v0}, Lcom/baidu/mobads/production/rewardvideo/a;->u()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    .line 6
    invoke-virtual {v0}, Lcom/baidu/mobads/production/rewardvideo/a;->a()Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    .line 7
    invoke-virtual {v0}, Lcom/baidu/mobads/production/rewardvideo/a;->t()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 8
    sput-boolean v1, Lcom/baidu/mobads/MobRewardVideoImpl;->mVideoPlaying:Z

    .line 9
    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    invoke-virtual {v0}, Lcom/baidu/mobads/production/rewardvideo/a;->v()V

    goto :goto_0

    .line 10
    :cond_1
    invoke-direct {p0}, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->a()V

    .line 11
    iget-object v0, p0, Lcom/baidu/mobads/rewardvideo/RewardVideoAd;->c:Lcom/baidu/mobads/production/rewardvideo/a;

    invoke-virtual {v0, v1}, Lcom/baidu/mobads/production/rewardvideo/a;->c(Z)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 12
    :cond_2
    :goto_0
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
